/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package labb6;

import java.util.Comparator;

/**
 *
 * @author Lisa
 */
public class ArrayComp implements Comparator{
    private int colToSortBy;
    ArrayComp(int colToSortBy){
        this.colToSortBy = colToSortBy;
    }
    
    @Override
    public int compare(Object in1, Object in2) {
        String[] array1  = (String[])in1;
        String[] array2 = (String[])in2;
        return array1[colToSortBy].compareTo(array2[colToSortBy]);
    }
    
}
